<?php
            
namespace Admin\Model;
use Think\Model;
use Think\Upload;

/**
 * 商品规格模型
 *  
 */

class ProductSpecLeanCloudModel extends SyncModel{
    protected $tableName = 'product_spec'; 
    
    //leancloud表名
    protected $leancloudName = "ProductSpec";
    
    
    //配置字段
    protected $fields = array(
        'objectId', 
        'sku',
        'name', 
        'pid', 
        'price',
        'grprice',
        'inventory', 
        'salenum', 
        'isnice', 
        'activity', 
        'point',
        'isPoint',
        'pointRate',
        'isCoupon',
        'isDiscount',
        'isMorning',
        'createdAt',
        'updatedAt',
        'syncStatus', 
        'status',
        '_type'=>array(
            'objectId'=>'int', 
            'sku'=>'varchar',
            'name'=>'varchar', 
            'pid'=>'int', 
            'price'=>'int', 
            'grprice'=>'int', 
            'inventory'=>'int', 
            'salenum'=>'int', 
            'isnice'=>'int', 
            'activity'=>'int', 
            'point'=>'int', 
            'isPoint'=>'int',
            'pointRate'=>'int',
            'isDiscount'=>'int',
            'isCoupon'=>'int',
            'isMorning'=>'int',
            'createdAt'=>'int',
            'updatedAt'=>'int',
            'syncStatus'=>'int', 
            'status'=>'int'
        )
    );
    
    
    //leancloud 字段类型
    protected $leancloudelds = array(
        "objectId"=>"String",
        "sku"=>"String",
        "name"=>"String",
        "pid"=>"Number",
        "price"=>"Number",
        "grprice"=>"Number",
        "inventory"=>"Number",
        "salenum"=>"Number",
        "isnice"=>"Number",
        "activity"=>"Number",
        'point'=>'Number', 
        'isPoint'=>'Number',
        'pointRate'=>'Number',
        'isDiscount'=>'Number',
        'isCoupon'=>'Number',
        'isMorning'=>'Number',
        'createdAt'=>'Date',
        'updatedAt'=>'Date',
        'syncStatus'=>'Number', 
        'status'=>'Number'
    );
   
     
}
